package com.ruoyi.api.api;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

/**
 * @author 寻觅
 * @since 2025-07-02
 */
public class dateZhuanhuan {
    public static void main(String[] args) {
        String dateStr = "30-Sep-2024";

        // 定义输入格式（注意月份缩写为英文，需指定Locale.ENGLISH）
        DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("dd-MMM-yyyy", Locale.ENGLISH);

        // 解析字符串为LocalDate
        LocalDate localDate = LocalDate.parse(dateStr, inputFormatter);

        System.out.println("解析后的LocalDate: " + localDate); // 输出: 2024-09-30
    }
}
